package myky.com.doctorapp.api;

/**
 * @author Mr.li
 * @date 2018/8/1
 */

public class Address {

    private static ServerEnvironmentEnum serverEnvironment = ServerEnvironmentEnum.ONLINE;
    public static final String H5_URL = "http://m.carecnn.com/";

    /**
     * baseUrl
     */
    public static String BASEURL = "http://10.100.1.145/";

    /**
     * 图片域名
     **/
    public static String IMAGE = "http://10.100.1.145/";

    /**
     * 图片上传地址
     **/
    public static String IMAGEUPLOADURL = IMAGE + "testimg/upload";

    /**
     * 第一次断点上传
     */
    public static  String IMAGEFIRSTAPPEND = IMAGE + "testimg/firstappend";

    /**
     * 断点继续上传
     */
    public static  String IMAGEAPPEND = IMAGE + "testimg/append";

    public static final String NEW_H5_URL =BASEURL+ "h5_app/#";


    /**
     * 用户协议
     */
    public static final String USER_SERVICE_URL = NEW_H5_URL + "/app_user";

    /**
     * 用户隐私协议
     */
    public static final String USER_SECREAT_URL = NEW_H5_URL + "/app_yczc";

    /**
     * 问诊表url
     */
    public static  String FOLLOWURL=BASEURL+"scmd-suif/index.html?";
    static {
        initHost();
    }

    /**
     * 加载 HOST地址
     */
    private static void initHost() {
        switch (serverEnvironment) {
            // 测试环境
            case TEST:
                BASEURL = "http://10.100.1.145/";
                IMAGE = "http://10.100.1.145/";
                break;
            // 线上环境
            case ONLINE:
                BASEURL = "http://www.carecnn.com/";
                IMAGE = "http://www.carecnn.com/";
                break;
            // 预生产环
            case PRE_ONLINE:
                IMAGE = "http://www.carecnn.com/";
                BASEURL = "http://114.112.104.66/";
                break;
            // 压力测试环境
            case STRESS_TEST:
                BASEURL = "http://10.100.1.145/";
                IMAGE = "http://10.100.1.145/";
                break;
            default:
        }
    }

    /**
     * @NATIVEDEBUG 本地环境
     * @TEST 测试环境
     * @ONLINE 线上环境
     * @PRE_ONLINE 预发布环境
     * @STRESS_TEST 压力测试环境
     */
    public static enum ServerEnvironmentEnum {

        NATIVEDEBUG(" - Nativedebug"), TEST(" - Test"), ONLINE(""), PRE_ONLINE(" - Pre_Online"), STRESS_TEST(
                " - Stress_Test");

        private String displayName;

        public String getDisplayName() {
            return displayName;
        }

        private ServerEnvironmentEnum(String displayName) {
            this.displayName = displayName;
        }
    }

    /**
     * 健康资讯文章
     */
    public static final String HEALTHLECTUREURL = BASEURL + "app/tag/article/list/healthLecture/";

    //医生讲堂详情html
    public static final String HealthContentUrl = BASEURL + "app/content/artical/html/";

}
